unit ujfglStu;
{$WARN SYMBOL_PLATFORM OFF}

interface

uses
  Mtsobj, ComObj, jfglComSrv_TLB, uJfglStuMaint, StdVcl;

type
  TjfglStu = class(TMtsAutoObject, IjfglStu)
  protected
    function Get_Hint_Msg(const Sjzh: WideString): OleVariant; safecall;
    function Get_Xs_Bj(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Xm(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Sj_Host(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Sj_IP(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Sj_Je(const Sjzh: WideString): OleVariant; safecall;
    function Get_Xs_Sj_Jfh(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Sj_Type(const Sjzh: WideString): WideString; safecall;
    function Get_Xs_Sj_Ye(const Sjzh: WideString): OleVariant; safecall;
    function Get_Xs_Status(const Sjzh: WideString): WideString; safecall;

    function Xs_Is_Exists(const Sjzh: WideString): OleVariant; safecall;
    function Xs_Login(const Sjzh, Pwd, Host, Ip: WideString;
      var Res_Str: WideString): OleVariant; safecall;
    function Xs_Logout(const Sjzh: WideString): OleVariant; safecall;
    function Xs_Pwd_Is_OK(const Sjzh, Pwd: WideString): OleVariant; safecall;
    function Room_Is_Jxjf(const jfh: WideString): OleVariant; safecall;

    function Host_Is_Jxjf(const Host: WideString): OleVariant; safecall;
    function Host_Register(const Host, Ip: WideString): OleVariant; safecall;
    function Host_UnRegister(const Host, Ip: WideString): OleVariant; safecall;
    function Host_Is_Registered(const Host: WideString): OleVariant; safecall;

    function Check_Host(const Sjzh, Host, Ip: WideString; var Res_Type,
      Res_Str: WideString): OleVariant; safecall;
    function Register_Host(const Sjzh, Host, Ip: WideString; var Res_Type,
      Res_Str: WideString): OleVariant; safecall;
    function Change_Xs_Pwd(const Sjzh, OldPwd, NewPwd: WideString;
      var sError: WideString): OleVariant; safecall;
    function Change_Teacher_Pwd(const TeacherId, OldPwd, NewPwd: WideString;
      var sError: WideString): OleVariant; safecall;
    function Get_Teacher_XM(const TeacherId: WideString): WideString; safecall;
    function Teacher_Pwd_Is_OK(const TeacherId, Pwd: WideString): OleVariant;
      safecall;
    function Teacher_Is_Exists(const TeacherId: WideString): OleVariant; safecall;
    function FreeOpen_Is_Auto_Login: OleVariant; safecall;
    function Update_Xs_Info(const sjzh, xm, xb, nj, yx, sfzh, zy, bj,
      bjbh: WideString): OleVariant; safecall;
    function Is_Allow_Xs_Update_Info: OleVariant; safecall;
    function GetXsSkXkTime(const Sjzh: WideString; out SkTime,
      XkTime: WideString): OleVariant; safecall;
    function IsHideLastDisk: OleVariant; safecall;
  end;

implementation

uses ComServ;

function TjfglStu.Check_Host(const Sjzh, Host, Ip: WideString; var Res_Type,
  Res_Str: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Check_Host(Sjzh,Host,Ip,Res_Type,Res_Str);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Hint_Msg(const Sjzh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Hint_Msg(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Bj(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Bj(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Xm(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Xm(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_Host(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Host(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_IP(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Ip(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_Je(const Sjzh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Je(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_Jfh(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Jfh(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_Type(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Type(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Sj_Ye(const Sjzh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Sj_Ye(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Xs_Status(const Sjzh: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Xs_Status(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Register_Host(const Sjzh, Host, Ip: WideString; var Res_Type,
  Res_Str: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Register_Host(Sjzh,Host,ip,Res_Type,Res_Str);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Xs_Is_Exists(const Sjzh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Xs_Is_Exists(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Xs_Login(const Sjzh, Pwd, Host, Ip: WideString;
  var Res_Str: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Account_Login(Sjzh,pwd,host,Ip,Res_Str);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Xs_Logout(const Sjzh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Xs_Xj_Process(Sjzh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Xs_Pwd_Is_OK(const Sjzh, Pwd: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Xs_Pwd_Is_OK(Sjzh,Pwd);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Room_Is_Jxjf(const jfh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Room_Is_JxJf(jfh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Host_Is_Jxjf(const Host: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Host_Is_JxJf(Host);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Host_Register(const Host, Ip: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Host_Register(Host,Ip);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Host_UnRegister(const Host, Ip: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Host_UnRegister(Host,Ip);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Host_Is_Registered(const Host: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Host_Is_Registered(Host);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Change_Xs_Pwd(const Sjzh, OldPwd, NewPwd: WideString;
  var sError: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Change_Xs_Pwd(Sjzh,OldPwd,NewPwd,sError);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Change_Teacher_Pwd(const TeacherId, OldPwd,
  NewPwd: WideString; var sError: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Change_Teacher_Pwd(TeacherId,OldPwd,NewPwd,sError);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Get_Teacher_XM(const TeacherId: WideString): WideString;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Get_Teacher_Xm(TeacherId);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Teacher_Pwd_Is_OK(const TeacherId,
  Pwd: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Teacher_Pwd_Is_OK(TeacherId,Pwd);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Teacher_Is_Exists(const TeacherId: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Teacher_Is_Exists(TeacherId);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.FreeOpen_Is_Auto_Login: OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.FreeOpen_Is_Auto_Login;
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Update_Xs_Info(const sjzh, xm, xb, nj, yx, sfzh, zy, bj,
  bjbh: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Update_Xs_Info(sjzh,xm,xb,sfzh,nj,yx,zy,bj,bjbh);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.Is_Allow_Xs_Update_Info: OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.Is_Allow_Xs_Update_Info;
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.GetXsSkXkTime(const Sjzh: WideString; out SkTime,
  XkTime: WideString): OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.GetXsSkXkTime(Sjzh,SkTime,XkTime);
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

function TjfglStu.IsHideLastDisk: OleVariant;
var
  obj:TJfglStuMaint;
begin
  obj := TJfglStuMaint.Create;
  try
    try
      Result := obj.IsHideLastDisk;
      SetComplete;
    except
      SetAbort;
    end;
  finally
    obj.Free;
  end;
end;

initialization
  TAutoObjectFactory.Create(ComServer, TjfglStu, Class_jfglStu,
    ciMultiInstance, tmApartment);
end.
